package cn.rentaotao.spring.service;

import cn.rentaotao.spring.mapper.SpittleMapper;
import cn.rentaotao.spring.data.Spittle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author rtt
 * @date 2022/5/9 11:11
 */
@Service
// @Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.INTERFACES)
@Profile("dev")
public class SpittleServiceImpl implements SpittleService {

    private final SpittleMapper spittleMapper;

    @Autowired
    public SpittleServiceImpl(SpittleMapper spittleMapper) {
        this.spittleMapper = spittleMapper;
    }

    @Override
    public List<Spittle> getSpittleList(int start, int count) {
        return spittleMapper.findSpittles(start, count);
    }
}
